﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RMM.Core.Entity.Orders
{
    [Table("RMM_Order")]
    public class Order : Entity<long>, ICreationAudited, IModificationAudited
    {
        public Order()
        {
            Num = 1;
        }

        public string OrderCode { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public long UserId { get; set; }

        /// <summary>
        /// 店铺id
        /// </summary>
        public long ShopId { get; set; }

        /// <summary>
        /// 技师id
        /// </summary>
        public long MassagistId { get; set; }

        /// <summary>
        /// 下单地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 订单状态 0待付款 1待服务 2待确定 3待评价 4完成 10取消订单
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 审核状态
        /// </summary>
        public int AuditStatus { get; set; }

        /// <summary>
        /// 订单来源 默认小程序
        /// </summary>
        public int Soucre { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        public decimal Total { get; set; }

        /// <summary>
        /// 折扣
        /// </summary>
        public decimal Discount { get; set; }

        /// <summary>
        /// 优惠券金额
        /// </summary>
        public decimal Coupon { get; set; }

        /// <summary>
        /// 最终金额
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 消费月卡次数
        /// </summary>
        public int Card { get; set; }

        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime? PayDate { get; set; }

        /// <summary>
        /// 预约人数
        /// </summary>
        public int Num { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string MakeMobile { get; set; }

        /// <summary>
        /// 联系人姓名
        /// </summary>
        public string MakeName { get; set; }

        /// <summary>
        /// 联系人备注
        /// </summary>
        public string MakeRemake { get; set; }

        public string Remark { get; set; }

        /// <summary>
        /// 是否查看
        /// </summary>
        public bool IsRead { get; set; }

        public DateTime? ServerStartDate { get; set; }

        public DateTime? ServerEndDate { get; set; }


        public long? LastModifierUserId { get; set; }
        public DateTime? LastModificationTime { get; set; }
        public long? CreatorUserId { get; set; }
        public DateTime CreationTime { get; set; }
    }
}
